David Zeuthen [Fri, 25 Feb 2011 22:42:25 +0000 (17:42 -0500)]
Move calendar handling out-of-process
Unfortunately the evolution-data-server client-side libraries seem to
block the calling thread. This is a major problem as we must never
ever block the main thread (doing so causes animations to flicker
etc.). In the worst case, this problem causes login to hang (without
falling back to fall-back mode) and in the best case it slows down
login until a network connection is acquired.
Additionally, in order to sanely use these evolution-data-server
libraries, GConf has to be involved and GConf is not thread-safe. So
it's not really feasible just moving the code to a separate
thread. Therefore, move all calendar IO out of process and use a
simple (and private) D-Bus interface for the shell to communicate with
the out-of-process helper.
For simplification, remove existing in-process code since internal
interfaces have been slightly revised. This means that the shell is no
longer using any native code for drawing the calendar dropdown.
Colin Walters [Fri, 25 Feb 2011 19:41:39 +0000 (14:41 -0500)]
Claim DBus names (Shell, Notifictions) *very* early
See commit f2158218bef0c51 in mutter. Basically, we need
to grab org.freedesktop.Notifications before anything else
in the session gets started.
Note: I intentionally removed the Util.killall bits. I believe that
for notification-daemon at least, if we specify
DBUS_NAME_FLAG_REPLACE_EXISTING, we'll take over the name. Not sure
about notify-osd; if that's still a problem, then what we need to do
is add killing (and possibly respawning) of notify-osd to
"gnome-shell --replace", and not have it embedded randomly in a JS file.
Ensure that all signatures are defined in DBus interfaces
The DBus JS binding will complain if the signature of a method
or of a signal is undefined, so we need to define it even if it
is an empty string, and we need to use the correct property name
for signals.
Florian Müllner [Fri, 25 Feb 2011 12:49:34 +0000 (13:49 +0100)]
alt-tab: Enforce icon size
For applications with no proper desktop file, the window icon is
used as application icon in the tab switcher, but it won't have
the correct icon size. The current approach is to add additional
padding to these icons - the size turns out inconsistent with
other icons, but the icon appears sharp. For the dash it has been
decided that unsharp icons are less evil than differing icon sizes,
so icons are scaled up to the "right" size - for consistency, do the
same in the alt-tab switcher.
Florian Müllner [Thu, 10 Feb 2011 15:30:28 +0000 (16:30 +0100)]
base-icon: Enforce the requested icon size
Mainly due to StTextureCache's way of handling fallback icons, an
implementation of BaseIcon.createIcon() may return an icon smaller
than the requested size. Given that BaseIcon is not used for isolated
elements, but rather for groups of related items (App view, Dash,
Search Results, ...), having some elements end up with the wrong
size is more annoying than having some elements end up ugly due to
scaling, so explicitly enforce the requested icon size.
Florian Müllner [Fri, 25 Feb 2011 16:50:39 +0000 (17:50 +0100)]
app-display: Escape categories in filter labels
As gnome-shell now switched to use the menu file from gnome-menus,
we no longer have direct control over category names. If such a name
contains unescaped markup, the shell will crash when trying to create
the filter label, so make sure to escape markup in category names.
Vincent Untz [Tue, 1 Feb 2011 14:26:31 +0000 (15:26 +0100)]
Drop gs-applications.menu so the standard one is used
gs-applications was introduced because we initially wanted a limited set
of categories, but this has now changed and we're back to categories
similar to the ones in the applications.menu from gnome-menus.
We can fix gnome-menus to have better categories, if needed.
Florian Müllner [Thu, 24 Feb 2011 17:26:40 +0000 (18:26 +0100)]
panel: Don't let the app icon overlap the panel border
Commit 9a048af1f changed the panel border to be drawn below the
background - as a result, the app menu's icon now overlaps the
panel border. As it looks cleaner to leave the border in place,
clip the icon to the panel border.
Dan Winship [Wed, 16 Feb 2011 18:27:05 +0000 (13:27 -0500)]
viewSelector: don't process key presses from capture-event
Rather than connecting to stage::capture-event and then trying to
guess whether or not a given key-press should be handled by us or not,
handle the end-search-on-Escape case from entry::key-press-event
(since it only makes sense when the entry is focused anyway) and the
start-search-on-printable-key case from stage::key-press-event (which
will only get the events that no other actor wanted for itself).
Similarly, do exit-overview-on-Escape and switch-panes cases from
stage::key-press-event, rather than
viewSelector.actor::key-press-event, so that they will work correctly
even if the keyboard focus is somewhere else. (Also fix a longstanding
bug in the pane-switching code, which was supposed to be disabled when
a search was active, but was checking a non-existent variable.)
Dan Winship [Wed, 16 Feb 2011 18:44:03 +0000 (13:44 -0500)]
viewSelector: remove the search entry's event grab
The search entry was taking a sort of grab when it was in the
focused-but-empty state, and would eat up most events for other actors
(except, confusingly, for panel actors). The only bit of "modality" we
really need here is that the entry is supposed to go back to the
unfocused state if you click somewhere outside it when it was in the
focused-but-empty state. So do that.
Dan Winship [Wed, 16 Feb 2011 18:20:03 +0000 (13:20 -0500)]
viewSelector: merge SearchEntry into SearchTab
The division of labor between the two was quite muddled. Rather than
try to invent a clean distinction of what belongs where, just merge
them together.
Florian Müllner [Thu, 24 Feb 2011 01:16:07 +0000 (02:16 +0100)]
scroll-view-fade: Adjust the effect to work in RTL locales
The vertical scrollbar is located on the left in RTL locales, so
pass an additional parameter to the shader which indicates the
locale's text direction.
Florian Müllner [Thu, 24 Feb 2011 00:34:44 +0000 (01:34 +0100)]
scroll-view: Make scrollbar position locale aware
In RTL locales, the vertical scrollbar should be located on the
left, so take the widget's text direction into account when
allocating the view's elements.
Adel Gadllah [Thu, 24 Feb 2011 10:30:46 +0000 (11:30 +0100)]
XDND: Remove the switch timeout in _onDragEnd
When the user cancels the drag while hovering over a window the timeout
handler will throw an exception because the drag actor will be destroyed
at this point.
Adel Gadllah [Thu, 24 Feb 2011 10:25:29 +0000 (11:25 +0100)]
XDND: Always update the timestamp on motion
The xdnd timestamp gets updated on every xdnd-position event,
so while waiting for the window timeout to fire we need to make sure we
update the timestamp when getting on motion to activate the window
with the correct timestamp.
Commit 259c84ed9a refactored out HotCorner into its own class
and added this line and a variable, but it was left behind
when the variable disappeared in commit 7cf311dac024d.
David Zeuthen [Wed, 23 Feb 2011 18:34:29 +0000 (13:34 -0500)]
polkit: don't show authentication dialog until needed
See https://bugs.freedesktop.org/show_bug.cgi?id=27788#c1 for details
about the problem this patch is solving
In particular, we should never bring up the dialog if there is no
password on the account. While this sounds like a weird corner case,
it's not.. the Live CD, for example, does not have a root password.
This also avoids the initial dialog resize.. before the patch the
authentication dialog appears and a split-second later an StEntry
widget is added.
Also print out more diagnostic information if showing the modal dialog
fails. Also add a comment about how to easily make this happen.
Florian Müllner [Wed, 23 Feb 2011 17:56:51 +0000 (18:56 +0100)]
panel: Add a relayout() method to position the panel
Currently the panel is positioned from main.js, move that code into
a method in panel.js instead and call it from main.js, which is
consistent with what we do for the overview.
Florian Müllner [Mon, 21 Feb 2011 18:04:40 +0000 (19:04 +0100)]
panel: Move panel border into the background
In the mockups the bottom border of active panel buttons is drawn
on top of the panel's border. To get this effect, move the panel
border into the background, so that it is not subtracted from the
vertical space given to the buttons. Adjust the drawing of the rounded
corners to reflect that change.
David Zeuthen [Tue, 22 Feb 2011 21:54:08 +0000 (16:54 -0500)]
polkit: return error when authentication dialog is dismissed
This allows PolicyKit applications to disambiguate between when the
authentication dialog is dismissed versus when authentication fails
(e.g. the wrong password has been entered).
See https://bugs.freedesktop.org/show_bug.cgi?id=30653 for more
information.
Since Ubuntu patches clutter-1.0.pc to remove x11 from the requires,
we have to list it explicitly for places we use X11 functions, like
ST and the shell recorder.
No need to Check for grabbed menus on hot corner enter/click
We never get enter events anyway due to the menu code, and if
the user clicks on a non-menu the menu is removed and ungrabbed
before the target actor gets the event anyway.
Adel Gadllah [Wed, 23 Feb 2011 13:34:37 +0000 (14:34 +0100)]
dateMenu: Make sure that the event list fills the available width
Currently the menu has a hardcoded width which result into the hover
effect of the "Open Calendar" item being "cut off" in the middle rather
then reaching to the edge.
To be consistent with other menu items, make it expand to fill the available
space.
Now that we are using Cantarell as the default UI font, some clarity
was reduced in using the calendar. Mockups already address this so
change the font styles in CSS to match the mockups.
Owen W. Taylor [Wed, 23 Feb 2011 00:32:46 +0000 (19:32 -0500)]
Remove minimize and maximize buttons from title bar
The minimize and maximize buttons on the titlebar have lost much of their
utility in GNOME 3: the minimize functionality is largely superceded by
the ability to switch windows in the overview and conveniently use
multiple workspaces, while the maximize functionality is available by
drag to the top gesture or double clicking on the title bar.
Removing these buttons significantly cleans up the default appearance
and avoids exposing a half-done implementation of minimization.
Florian Müllner [Tue, 22 Feb 2011 16:40:32 +0000 (17:40 +0100)]
panel: Defer adding the user status menu to the manager
PopupMenuManager relies on menus being added in the order of the
menu buttons they are attached to, so defer adding the user status
menu until the status icon menus have been added to make the manager
happy.
This patch modifies MessageTray behaviour so that normal (not urgent)
notifications are not shown when the user is Busy (they're sent
immediately to the Summary area). When status is then changed,
notifications still pending are shown again.
Additionally, when status is modified from Idle to anything other than
Busy, the message tray is forced open for 4 seconds, so that summary
icons are visible.
David Zeuthen [Mon, 21 Feb 2011 17:17:34 +0000 (12:17 -0500)]
Add a PolicyKit authentication agent
A PolicyKit Authentication Agent is a construct used to authenticate
one or more identities. See the PolicyKit documentation for more
details on authentication agents and how PolicyKit works:
http://hal.freedesktop.org/docs/polkit/
Since gjs does not support subclassing a GObject class from Javascript
code, we bring in a native class to bridge the VFuncs to GObject
signals. Additionally, this native class also queues up authentication
requests so the user of the native class only has to deal with a
single outstanding request at any one time.
The file js/ui/polkitAuthenticationAgent.js introduces a singleton
that listens for authentication requests via the native class. This
singleton uses the PolkitAgent machinery to do the actual heavy-weight
lifting required for authentication (essentially a PAM conversation).
We currently don't allow the user to pick the identity to be
authenticated.
When retrieving a ShellApp from the GHashTable of child processes,
we need to take an extra reference, that the GHashTable of windows
to apps will own.
Also add some documentation to avoid repeating this bug in the future.
Adel Gadllah [Wed, 16 Feb 2011 20:12:07 +0000 (21:12 +0100)]
shell_global: Use clutter_event_get_time rather then get_current_event_time
Using clutter_get_current_event_time can result into too old timestamps
when there is no current Clutter or Mutter event, since
clutter_get_current_event_time() returns the timestamp of the last event
delivered to Clutter. This can result in, for example, grabs failing. Use
the event time of the current event (if any) and CurrentTime otherwise.
Make the right padding bigger and the left padding smaller, so that the
boundaries that trigger the accordion effect are more closely associated
with corresponding icons. Also slightly decrease the overall padding between
sources.
Complex popup menus require the ability to manager sequences of items
as "sections", to which you can add and and remove items, as well
as hide and show.
PopupMenuSection does exactly that, leveraging the existing machinery
for submenus, but without being exposed as a submenu to the user.
Also, make getMenuItems() private, since it is used for different things
now and may change semantics in the future.
Make all subclasses of PopupMenuBase accept a params argument, which
can be used to make the item non reactive, not responsive to hover
and, as a new feature, with a different style class.
Owen W. Taylor [Mon, 21 Feb 2011 14:32:35 +0000 (09:32 -0500)]
overview: avoid round-off errors when sizing and positioning view selector
We need the view selector to extend all the way to the right edge of the
monitor, so size and position the view selector in a way that the sum of
its X position and its width add up to the primary monitor width.
Florian Müllner [Fri, 18 Feb 2011 01:33:41 +0000 (02:33 +0100)]
panel-buttons: Remove transitions for corner buttons
So far transitions do not work for the custom drawn corners, so to
avoid a visible glitch when transitioning a button in the panel corner
while updating the style of the apparently attached corner instantly,
remove transition of those panel buttons until we make it work for the
custom drawn parts as well.
Florian Müllner [Wed, 9 Feb 2011 02:12:10 +0000 (03:12 +0100)]
panel: Add rounded corners
Current mockups show the panel curving downwards at the edges to
frame the work area and look awesome. Implement those as separate
actors to not affect the struts set by the panel, and synchronize
their state with the corresponding panel buttons so they blend in
with the panel. It might be worth considering whether the corners
should be hidden with maximized windows on the current workspace,
though this might affect the illusion of them being part of the
panel. As the corners don't affect the input region, the small
overlap with windows might not be too bad after all.
Florian Müllner [Sat, 19 Feb 2011 11:21:07 +0000 (12:21 +0100)]
panel: Adjust CSS for RTL locales
The groups at the panel sides use different left/right padding, so
a slightly different CSS is required for RTL locales. Add :rtl
pseudo classes as necessary and adjust the CSS.
Florian Müllner [Fri, 18 Feb 2011 22:00:04 +0000 (23:00 +0100)]
appMenu: Clip app icon when the button is active
We now use a border image on active panel buttons to underline the
button's content. As the property does not affect the content's
allocation, the app icon ends up being drawn on top of the border
image. To prevent this, use a custom property to clip the bottom of
the app icon when the button is active.
Florian Müllner [Wed, 9 Feb 2011 02:11:57 +0000 (03:11 +0100)]
panel: Update style
Update the style of the panel to match the latest mockups.
- add a subtle border at the bottom of the panel
- use a highlight of active panel buttons similar to the one
used for running applications in the dash/app view
- shadow the buttons' label/icon when highlighted
Florian Müllner [Fri, 18 Feb 2011 01:34:45 +0000 (02:34 +0100)]
panel: Move statusmenu initialization in the constructor
While related to the status area, the user status button is clearly
not a status icon, and it does not make too much sense in
startStatusArea(), which is about filling the status area with
icons. Also, the status icon container is added to the panel in
the constructor, in fact, the user status button is the only "toplevel"
panel element which is initialized elsewhere. Not a crucial change,
but makes for a nice read anyway.
Florian Müllner [Thu, 10 Feb 2011 21:11:48 +0000 (22:11 +0100)]
search-entry: Update style
Update the style of the search entry to match the latest mockups[0].
- use a (non-reactive) loupe icon when no search is active
- use themed symbolic icons
- make the entry rounder
- tweak gradient colors
- use an inset shadow
Florian Müllner [Wed, 16 Feb 2011 15:47:46 +0000 (16:47 +0100)]
tests: Add a box-shadow test
The original support for CSS based shadows has been extended with
support for an optional spread radius and the 'inset' keyword,
so with the additional complexity a dedicated test case looks
appropriate.
Florian Müllner [Mon, 14 Feb 2011 01:34:00 +0000 (02:34 +0100)]
st-theme-node: Add support for inset box-shadows
Implement inset box-shadows as in the CSS3 draft[0]. As the shadow
should appear beneath the node's border, we pick the slow cairo based
rendering path (though a cogl based path could be added in case the
node has a solid background with no borders).
Florian Müllner [Mon, 14 Feb 2011 01:07:14 +0000 (02:07 +0100)]
st-shadow: Parse the 'inset' keyword
The box-shadow property in the CSS3 draft[0] supports the optional
'inset' keyword for inner shadows cast onto the background. Add
support for the keyword to the shadow parsing code.